<input type="hidden" value=""/>
{if $parent_id}
    <input type="hidden" name="parent_id" value="{$parent_id}"/>
    <div class="layui-form-item">
        <label class="layui-form-label">所属数据表</label>
        <div class="layui-input-block">
            <select name="table_name">
                <option value="">无选择</option>
                {foreach from=$tables item=table}
                    <option value="{$table.Tables_in_fastphp}">{$table.Tables_in_fastphp}</option>
                {/foreach}
            </select>
        </div>
    </div>
{else}
    <div class="layui-form-item">
        <label class="layui-form-label">所属父菜单</label>
        <div class="layui-input-block">
            <select name="parent_id">
                <option value="0">无选择</option>
                {foreach from=$parents item=parent}
                    <option value="{$parent.id}">{$parent.name}</option>
                {/foreach}
            </select>
        </div>
    </div>
{/if}
<div class="layui-form-item">
    <label class="layui-form-label">菜单名</label>
    <div class="layui-input-block">
        <input type="text" name="name" placeholder="请输入菜单名" class="layui-input" lay-verify="required">
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">菜单地址</label>
    <div class="layui-input-block">
        <input type="text" name="url" placeholder="请输入菜单地址" class="layui-input">
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">排序</label>
    <div class="layui-input-block">
        <input type="number" name="order_num" placeholder="请输入排序" class="layui-input">
    </div>
</div>
<div class="layui-form-item">
    <img id="preImg" src="" style="width: 50px;height: 50px;" alt="预览图片"/>
    <button type="button" class="layui-btn" id="test1">
        <i class="layui-icon">&#xe67c;</i>上传图片
    </button>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">状态</label>
    <div class="layui-input-block">
        <input type="radio" name="status" value="1" title="开启" checked>
        <input type="radio" name="status" value="0" title="关闭">
    </div>
</div>

